home *** CD-ROM | disk | FTP | other *** search
- Path: northshore.shore.net!not-for-mail
- From: dannyw@shore.net (Danny Willis)
- Newsgroups: comp.lang.c
- Subject: Re: allocating unlimited string input....HELP
- Date: 13 Jan 1996 22:36:54 -0500
- Organization: Shore.Net/Eco Software, Inc; (info@shore.net)
- Message-ID: <4d9tom$og1@northshore.shore.net>
- References: <4cvph6$s8s@pulp.ucs.ualberta.ca> <4d0msi$mso@news.gate.net>
- NNTP-Posting-Host: northshore.ecosoft.com
-
- bhutto@gate.net (William Hutto) writes:
-
- >In article <4cvph6$s8s@pulp.ucs.ualberta.ca>,
- > ryangall@gpu.srv.ualberta.ca (Bobby Sixkiller) wrote:
- >>I am doing an assignment for my computing class, and seem to have run into
- >>a small problem. I am supposed to be able to read an unlimited string from
- >>stdin, without defining maximum size. I thought that this problem would be
-
- >Small problem? I assume by *read* above, you mean to store. Your teacher must
- >be pulling your leg. If you *ever* write a robust function to achieve the
- >above, let me know.
-
- >Bill
-
- You're right: a lot depends on the problem definition here. In particular,\
- the simple stdin to stdout copy function at the beginning of K&R would
- fit the requirements and do something useful. Alternatively:
- while ((c=getc(stdin)!=EOF);
- would fit the stated requirments too!
- !
-